<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
	<head lang="en">
		<meta charset="utf-8" />
		<title>最家</title>
		<link rel="stylesheet" type="text/css" href="css/public.css"/>
		<link rel="stylesheet" type="text/css" href="css/myorder.css" />
	</head>
	<body>
		<!------------------------------head------------------------------>
		<div class="head ding">
			<div class="wrapper clearfix">
				<div class="clearfix" id="top">
					<h1 class="fl"><a href="index.jsp"><img src="img/logo.png"/></a></h1>
					<div class="fr clearfix" id="top1">
						<p class="fl">
							<a href="#" id="login">登录</a>
							<a href="#" id="reg">注册</a>
						</p>
						<form action="#" method="get" class="fl">
							<input type="text" placeholder="搜索" />
							<input type="button" />
						</form>
						<div class="btn fl clearfix">
							<a href="mygxin.jsp"><img src="img/grzx.png"/></a>
							<a href="#" class="er1"><img src="img/ewm.png"/></a>
							<a href="cart.jsp"><img src="img/gwc.png"/></a>
							<p><a href="#"><img src="img/smewm.png"/></a></p>
						</div>
					</div>
				</div>
				
			</div>
		</div>
		<!------------------------------idea------------------------------>
		<div class="address mt">
			<div class="wrapper clearfix">
				<a href="#" class="fl">首页</a>
				<span>/</span>
				<a href="mygxin.jsp">个人中心</a>
				<span>/</span>
				<a href="myorderq.jsp" class="on">我的订单</a>
			</div>
		</div>
		
		<!------------------------------Bott------------------------------>
		<div class="Bott">
			<div class="wrapper clearfix">
				<div class="zuo fl">
					<h3>
						<a href="#"><img src="../${loginUser.img }" width="92" height="92"/></a>
						<p class="clearfix"><span class="fl">[${loginUser.name }]</span><span class="fr">[退出登录]</span></p>
					</h3>
					<div>
						<h4>我的交易</h4>
						<ul>
							<li><a href="findShopcarts.do">我的购物车</a></li>
							<li><a href="toMyOrder.do">我的订单</a></li>
							<li><a href="myprod.jsp">评价晒单</a></li>
						</ul>
						<h4>个人中心</h4>
						<ul>
							<li><a href="toMygxin.do">我的中心</a></li>
							<li><a href="findAddress.do">地址管理</a></li>
						</ul>
						<h4>账户管理</h4>
						<ul>
							<li  class="on"><a href="toMygrxx.do">个人信息</a></li>
							<li><a href="remima.jsp">修改密码</a></li>
						</ul>
					</div>
				</div>
				<div class="you fl">
					<div class="my clearfix">
						<h2 class="fl">我的订单</h2>
					</div>
					<div class="dlist clearfix">
						<ul class="fl clearfix" id="wa">
							<li  <c:if test="${empty status}"> class="on"</c:if>><a href="toMyOrder.do">全部订单</a></li>
							<li <c:if test="${status eq 0 }"> class="on"</c:if>><a href="toMyOrder.do?status=0">待付款</a></li>
							<li <c:if test="${status eq 1 }"> class="on"</c:if>><a href="toMyOrder.do?status=1">待发货</a></li>
							<li <c:if test="${status eq 2 }"> class="on"</c:if>><a href="toMyOrder.do?status=2">待收货</a></li>
							<li <c:if test="${status eq 3 }"> class="on"</c:if>><a href="toMyOrder.do?status=3">待评价</a></li>
							<li <c:if test="${status eq 4 }"> class="on"</c:if>><a href="toMyOrder.do?status=4">已完成</a></li>
						</ul>
						<form action="toMyOrder.do" method="get" class="fr clearfix">
							<input type="text" name="orderId" id="orderId" value="" placeholder="请输入订单号" />
							<input type="submit" name="" id="" value="" />
						</form>
					</div>
					<c:forEach items="${list }" var="d">
					<div class="dkuang">
						<p class="one">
						<c:if test="${d.status eq 0 }"><span >待付款</span></c:if>
						<c:if test="${d.status eq 1 }"><span style="color:red">待发货</span></c:if>
						<c:if test="${d.status eq 2 }"><span style="color:blue">待收货</span></c:if>
						<c:if test="${d.status eq 3 }"><span>待评价</span></c:if>
						<c:if test="${d.status eq 4 }"><span>完成</span></c:if>
						</p>
						<div class="word clearfix">
							<ul class="fl clearfix">
								<li>${d.createTime }</li>
								<li>${d.name }</li>
								<li>订单号:${d.orderId }</li>
								<li>在线支付</li>
							</ul>
							<p class="fr">订单金额：<span>${d.money }</span>元</p>
						</div>
						<div class="shohou clearfix">
							<!-- <a href="#" class="fl"><img src="img/g1.jpg"/></a>
							<p class="fl"><a href="#">家用创意菜盘子圆盘 釉下彩复古</a><a href="#">¥99.00×1</a></p> -->
							<p class="fr">
						<c:if test="${d.status eq 0 }"><a href="myprod.jsp">立即支付</a></c:if>
						<c:if test="${d.status eq 2 }"><a href="javascript:qrsh('${d.orderId }')">确认收货</a></c:if>
						<c:if test="${d.status eq 3 }"><a href="toComment.do?orderId=${d.orderId }">去评价</a></c:if>
								<a href="toMyOrderDetail.do?orderId=${d.orderId }">订单详情</a>
							</p>
						</div>
					</div>
					</c:forEach>
					
				</div>
			</div>
		</div>
		<!--返回顶部-->
		<div class="gotop">
			<a href="cart.jsp">
			<dl>
				<dt><img src="img/gt1.png"/></dt>
				<dd>去购<br />物车</dd>
			</dl>
			</a>
			<a href="#" class="dh">
			<dl>
				<dt><img src="img/gt2.png"/></dt>
				<dd>联系<br />客服</dd>
			</dl>
			</a>
			<a href="mygxin.jsp">
			<dl>
				<dt><img src="img/gt3.png"/></dt>
				<dd>个人<br />中心</dd>
			</dl>
			</a>
			<a href="#" class="toptop" style="display: none">
			<dl>
				<dt><img src="img/gt4.png"/></dt>
				<dd>返回<br />顶部</dd>
			</dl>
			</a>
			<p>400-800-8200</p>
		</div>
		<!--footer-->
		<div class="footer">
			<div class="top">
				<div class="wrapper">
					<div class="clearfix">
						<a href="#2" class="fl"><img src="img/foot1.png"/></a>
						<span class="fl">7天无理由退货</span>
					</div>
					<div class="clearfix">
						<a href="#2" class="fl"><img src="img/foot2.png"/></a>
						<span class="fl">15天免费换货</span>
					</div>
					<div class="clearfix">
						<a href="#2" class="fl"><img src="img/foot3.png"/></a>
						<span class="fl">满599包邮</span>
					</div>
					<div class="clearfix">
						<a href="#2" class="fl"><img src="img/foot4.png"/></a>
						<span class="fl">手机特色服务</span>
					</div>
				</div>
			</div>
			<p class="dibu">最家家居&copy;2013-2017公司版权所有 京ICP备080100-44备0000111000号<br />
			违法和不良信息举报电话：188-0130-1238，本网站所列数据，除特殊说明，所有数据均出自我司实验室测试</p>
		</div>
		<script src="js/jquery-1.12.4.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/public.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/user.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			function qrsh(orderId){
				$.ajax({
			   		  type:'post',//提交方式
			   		  url:'confirmSh.do',//url
			   		  data:{
			   			"orderId":orderId},
			   		  dataType:'json',
			   		  success:function(rsl){
			   			  //提示信息
			   			alert(rsl.msg);
			   			//刷新页面
			   			location.reload();
			   		  },
			   		  error:function(){
			   			  alert("系统异常！！")
			   		  }
			   	  })
			
			}
	</script>
	</body>
	
</html>

